﻿using System;
using System.Collections.Generic;
using System.Text;
using YSC_Core.BLL.Domain.BackstageModels;
using YSC_Core.BLL.Domain.CommonModels;
using YSC_Core.BLL.Domain.ViewModels;

namespace YSC_Services.BLL.Services.Interfaces
{
    /// <summary>
    /// 后台用户接口
    /// </summary>
    public interface IUserBackstageServices
    {
        /// <summary>
        /// 登陆接口
        /// </summary>
        /// <param name="userName"></param>
        /// <param name="passWord"></param>
        /// <returns></returns>
        ReturnValueModel Login(string userName, string passWord);

        /// <summary>
        /// 用户列表
        /// </summary>
        /// <param name="index"></param>
        /// <param name="size"></param>
        /// <param name="status">是否停用: -1 停用0: 正常 1: 认证用户 2:未认证</param>
        /// <param name="sasearch"></param>
        /// <param name="isAttest">认证类型 0 市场 1 :产地 </param>
        /// <returns></returns>
        PaginationModel GetUserAll(int index, int size, int status, string isAttest, string areCode, string sasearch);

        /// <summary>
        /// 后台用户列表
        /// </summary>
        /// <param name="index"></param>
        /// <param name="size"></param>
        /// <param name="status">是否停用: -1 停用0: 正常 1: 已授权 2:未授权</param>
        /// <param name="isAttest">认证类型 0 市场 1 :产地</param>
        /// <param name="sasearch"></param>
        /// <returns></returns>
        PaginationModel GetUserBackstageAll(int index, int size, int status, string isAttest, string areCode, string sasearch);

        /// <summary>
        /// 用户密码修改
        /// </summary>
        /// <param name="password"></param>
        /// <param name="id"></param>
        /// <returns></returns>
        ReturnValueModel GetUserPasswordChange(string oldPassword, string password, string id);



        /// <summary>
        /// 用户详情
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        ReturnValueModel GetUser(string userId);

        /// <summary>
        /// 用户新增修改
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        ReturnValueModel AddUpdateUser(UserModels model);

        /// <summary>
        /// 后台用户新增修改
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        ReturnValueModel AddUpdateBackstageUser(UserModels model);

        /// <summary>
        ///  用户停用
        /// </summary>
        /// <param name="userId">主键Id</param>
        /// <returns></returns>
        ReturnValueModel DelectUser(string userId);

        /// <summary>
        /// 用户认证列表
        /// </summary>
        /// <param name="index"></param>
        /// <param name="size"></param>
        /// <param name="sasearch"></param>
        /// <returns></returns>
        ReturnValueModel UserAttestAll(int index, int size, string sasearch);

        /// <summary>
        /// 用户认证市场列表
        /// </summary>
        /// <param name="userAttestId"></param>
        /// <returns></returns>
        ReturnValueModel UserAttestUnitAll(int index, int size, string userAttestId);

        /// <summary>
        /// 用户认证审核
        /// </summary>
        /// <param name="userAttestId"></param>
        /// <param name="Remarks"></param>
        /// <param name="isAttest">0:通过认证 1;否决</param>
        /// <returns></returns>
        ReturnValueModel UserIsAttest(string userAttestId, string Remarks, int isAttest);

        /// <summary>
        /// 角色列表
        /// </summary>
        /// <param name="index"></param>
        /// <param name="size"></param>
        /// <param name="sasearch"></param>
        /// <returns></returns>
        PaginationModel GetRoleAll(int index, int size, string sasearch);

        /// <summary>
        /// 角色菜单列表
        /// </summary>
        /// <param name="roleid"></param>
        /// <returns></returns>
        PaginationyMenuModel GetRoleMenu(string roleid);

        /// <summary>
        /// 菜单赋值
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        ReturnValueModel AddUpdateRoleMenu(UpdateRoleMenu model);

        /// <summary>
        /// 用户授予角色
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="roleId"></param>
        /// <param name="roleAreCode">省市用户编码Core</param>
        /// <returns></returns>
        ReturnValueModel AddUserRole(string userId, string roleId, string roleAreCode, string remarks);

        /// <summary>
        /// 用户菜单
        /// </summary>
        /// <param name="roleId"></param>
        /// <returns></returns>
        ReturnValueModel UserMenu(string roleId);

        /// <summary>
        /// 菜单列表
        /// </summary>
        /// <returns></returns>
        PaginationyMenuModel GetMenuAll();

        /// <summary>
        /// 菜单新增
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        ReturnValueModel AddMenu(MenuModel model);

        /// <summary>
        /// 一级菜单
        /// </summary>
        /// <returns></returns>
        ReturnValueModel TopMenu();
    }
}
